#!/usr/bin/perl

use strict;
my $optie1 = $ARGV[0];

sub getPwdInfo {
  my $devName = "@_[0]";
  my $pwdInfo = "";
  while ( $devName ne "" ) {
    my $start;
    if ( "$devName" eq "bb.cc" ) {
      print("mooi");
      return $devName;
      last;
    }
    ( $start, $devName ) = split('\.', $devName, 2);
    print(" devName=$devName ");
  }
}

my $info = getPwdInfo( $optie1 );
print("\ninfo=$info\n");
